#pragma once

#include "inc.h"

namespace Core {

class IEngine
{
public:
    /**
      Perform context initialization, called on Core::Window engine setting.
      @param screen The main screen surface.
      */
    virtual void initialization(SDL_Surface *screen) = 0;

    /**
     * @brief destroy - release resources, deinitialize
     */
    virtual void destroy() = 0;

    /** All the games calculation and updating.
        @param elapsedTimeMs The time in milliseconds elapsed since the
        function was called last.
        **/
    virtual void logic(const long& elapsedTimeMs) = 0;

    /**
      Renders engine scene
      */
    virtual void draw() = 0;

    /**
     * @brief onKeyDown handles key pressing
     * @param key pressed key code
     * Even if user holds the key pressed, ONLY ONE event will occur.
     */
    virtual void onKeyDown(SDLKey key) = 0;

    /**
     * @brief onKeyUp handles key up event
     * @param key previously pressed key code
     */
    virtual void onKeyUp(SDLKey key) = 0;

    /**
     * @brief onMouseUp handles mouse button up
     */
    virtual void onMouseUp(MouseEvent event) = 0;

    /**
     * @brief onMouseDown handles mouse button down
     */
    virtual void onMouseDown(MouseEvent event) = 0;

    /**
     * @brief onMouseMove handles mouse cursor moving
     */
    virtual void onMouseMove(MouseEvent event) = 0;

    /**
     * @brief onIdle handles messages lack
     */
    virtual void onIdle() = 0;


    virtual ~IEngine() {}
};

} // namespace Core
